#!/bin/bash
datePattern=`date "+%Y%m%d"`
hive -e "use default; insert into table user_info select count(distinct id) as active_num, dt as dateStr from user_clicks where dt = ${datePattern} group by dt;"
